/*年轻人，只管向前看，不要管自暴自弃者的话*/

import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';

import '../res/color.dart';

///create by itz on 2024/1/18 10:46
///desc : 
class ThemeProvider{

  //平台模式状态
  final _platformBrightness = SchedulerBinding.instance.window.platformBrightness;


  ///获取主题
  ThemeData getTheme({bool isDarkMode = false}) {
    var themeData = ThemeData(
        brightness: isDarkMode ? Brightness.dark : Brightness.light,
        errorColor: isDarkMode ? FwColor.dark_red : FwColor.red,
        primaryColor: isDarkMode ? FwColor.dark_bg : Colors.green,
        //Tab指示器的颜色
        indicatorColor: isDarkMode ? primary[50] : white,
        //页面背景色
        scaffoldBackgroundColor: isDarkMode ? FwColor.dark_bg : white);
    return themeData;
  }
}